//
//  CommonHeader.h
//  YIChuSeller
//
//  Created by 田小椿 on 2018/12/7.
//  Copyright © 2018年 xiangshengjun. All rights reserved.
//

#ifndef CommonHeader_h
#define CommonHeader_h

//弱引用和强引用
#define WeakSelf(weakSelf)      __weak __typeof(&*self)     weakSelf  = self;
#define StrongSelf(strongSelf)  __strong __typeof(&*self)   strongSelf = weakSelf;
//判断iPhoneX
#define IS_IPHONE_X ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) : NO)
//判断iPHoneXr
#define IS_IPHONE_Xr ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(828, 1792), [[UIScreen mainScreen] currentMode].size) : NO)
//判断iPhoneXs
#define IS_IPHONE_Xs ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) : NO)
//判断iPhoneXs Max
#define IS_IPHONE_Xs_Max ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1242, 2688), [[UIScreen mainScreen] currentMode].size)  : NO)
#define Height_StatusBar ((IS_IPHONE_X==YES || IS_IPHONE_Xr ==YES || IS_IPHONE_Xs== YES || IS_IPHONE_Xs_Max== YES) ? 44.0 : 20.0)
#define Height_NavBar ((IS_IPHONE_X==YES || IS_IPHONE_Xr ==YES || IS_IPHONE_Xs== YES || IS_IPHONE_Xs_Max== YES) ? 88.0 : 64.0)
#define Height_TabBar ((IS_IPHONE_X==YES || IS_IPHONE_Xr ==YES || IS_IPHONE_Xs== YES || IS_IPHONE_Xs_Max== YES) ? 83.0 : 49.0)
//2.获得RGB颜色
//typedef void(^voidBlock)();
#define RGBAColor(r,g,b,a) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:a]
#define RGBColor(r, g, b) RGBAColor(r,g,b,1.0)
//#define kGlobalButtonColor RGBColor(108, 106, 107)
#define kGlobalbgColor RGBColor(236, 235, 243)
#define kGlobalLineColor RGBColor(244, 244, 244)
#define kGlobalButtonColor RGBColor(91, 210, 197)
//定义高度
#define kUIScreenSize [UIScreen mainScreen].bounds.size
#define kUIScreenWidth kUIScreenSize.width
#define kUIScreenHeight kUIScreenSize.height
#define kLoginStateKey @"LoginStateKey"
#define KLogin @"LoginState"
//上传图片文件夹名
#define  UserLogo @"userLogo" // 商铺Logo
#define  StoreLogo @"storeLogo" // 商铺Logo
#define  LiveAction @"liveAction" //店铺实景图
#define  MenuPic @"menuPic" //菜品图片
#define  BackImage @"backImage" //店铺背景图
#define  Cover @"cover" //首页封面
#define  Person @"person" //手持身份证照片
#define  IdcodeF @"idcodeF" //身份证正面照片
#define  IdcodeB @"idcodeB" //身份证背面照片
#define  Merchant1 @"merchant1" //营业资格证照片
#define  Merchant2 @"merchant2" //其他资质证照片
#define  StoreId  [AccountTool sharedAccountTool].account.sotres[@"storeId"]

//参数为空Block
typedef void(^voidBlock)(void);
//点击cell的Block
typedef void(^cellItemBlock)(UIButton * stateButton);
//处理完成的Block
typedef void(^CompleteHandle)(id responseObject);
//提交完成的Block
typedef void(^changeShopAuthBlock)(BOOL stateType);



//通知
#define kNotificationAddTable @"AddTable" //增加桌位
#define kNotificationChangeTable @"ChangeTable" //更改桌位
#define kNotificationAddMenu @"AddMenu" //新增内容

#endif /* CommonHeader_h */
